package propertiesio;

import java.util.Properties;
import java.util.Set;

public class Demo2 {
    public static void main(String[] args) {
        Properties pro = new Properties();
        pro.setProperty("张三","帅哥");
        pro.setProperty("李四","美女");
        System.out.println(pro);

        String s = pro.getProperty("张三");
        System.out.println(s);

        Set<String> strings = pro.stringPropertyNames();
        for (String key : strings) {
            Object value = pro.get(key);
            System.out.println(key+"="+value);
        }
    }
}
